<template>
	<div>



		<div class="header">



			<!-- title="智能供佛系统" -->
			<van-nav-bar style="  background: linear-gradient(90deg, #41A9B7,#4fd4e2, #41A9B7);height: 5rem;line-height:5rem;">

				<span @click="goAbout" class="title" slot="title">{{home_title}}</span>

				<!-- <span @click="goAbout" class="title" slot="title">永光照之</span> -->

			</van-nav-bar>
		
		</div>


		<!-- /////////////////////////////////////////////////////////// -->
		<div class="content" >
			<div class="image">
				<van-row type="flex" justify="space-around">
					<van-col span="1"></van-col>
					<!--  <van-col span="6"><img src="../../public/images/rank.png" alt=""  @click=""  ></van-col> -->
					<van-col span="6">
						
						<!-- require('@/assets/img/rank.png')  -->
						<van-image :src="require('@/assets/img/rank.png')" @click="goRank" width:="17.375rem" height="10.9375rem" fit="cover" />
					</van-col>
					<van-col span="6">
						
							<!-- ../../../assets/xxx.png -->
						<van-image :src="require('@/assets/img/yixiang.png')" @click="goGongfo" width:="17.375rem" height="10.9375rem" fit="cover" />
					</van-col>
					<van-col span="6">
						<van-image :src="require('@/assets/img/xundeng.png')" @click="goXundeng" width:="17.375rem" height="10.9375rem" fit="cover" />
					</van-col>


					<van-col span="1"></van-col>
				</van-row>
			</div>
			
			
			<van-dialog v-model="exit_show" title="退出界面" show-cancel-button @confirm="exit()" @cancel="exit_show=false" style="width: 30rem;">
				<span style="font-size: 0.8rem;color: firebrick;">是否要退出当界面程序？（此操作一般用于程序调试）</span>
			</van-dialog>



			<!-- 
			<marquee  direction="right"  behavior="alternate"  scrollamount="15"  scrolldelay="10"  loop="2"    height="100"  bgcolor="ABCDEF" >
				<font  face="隶书"  color="#0066FF"  size="5">行尽天涯静默山水间，倾听晚风拂柳笛声残</font>
			</marquee>
			<marquee  direction="down"  behavior="scroll"  scrollamount="25"  loop="1"  bgcolor="pink"  hspace="90"   vspace="50">
				<font  face="隶书"  color="red"  size="5">踏破芒鞋 烟雨任平生,慧行坚勇 究畅恒无极</font>
			</marquee> -->

			<!-- <div class="image">





			</div> -->


		</div>





	</div>
</template>

<script>
	export default {
		name: 'home',
		components: {

		},
		data() {
			return {
				imgs: [],
				home_title: "",
				click_time:0,
				click_count:0,
				exit_show:false
			}

		},
		methods: {
			goAbout() {
				console.log("点击");
				let current_time = new Date().getTime();
				let time=current_time-this.click_time;
				console.log(time);
				if(time<1200){
					
					this.click_count++;
					console.log(this.click_count);
					if(this.click_count>=4){
						
						/////////////////
						this.exit_show=true;//操作方法
						/////////////////
						this.click_count=0;
					}
				}else{
					this.click_count=0;
				}
				this.click_time = new Date().getTime();
			},
			click() {
				alert("1");
			},
			goRank() {
				this.$router.push("rank");
			},
			goXundeng() {
				this.$router.push("xundeng");
			},
			goGongfo() {
				this.$router.push("gongfo");
			},
			exit() {
				this.axios.get('http://localhost:8088/gui_exit')
					.then((res) => {
			
					})
					.catch((err) => {
						console.log("失败了");
						console.log(err)
					});
			
			}
			,
			getTitle(){
				
				
				
				
				console.log("getTitle run!");
				if (this.home_title = this.$store.getters.getTempleData) {
					//alert(1)
					this.home_title = this.$store.getters.getTempleData.gfj_title ;
				
				} else {
				
					setTimeout(() => {
							this.getTitle();
						//this.home_title = this.$store.getters.getTempleData.name + "智能供佛系统"
					}, 200);
					
				
				
				}
			}
		},
		created() {



		},
		mounted() {
		
			this.getTitle();





			//document.documentElement.webkitRequestFullScreen();
		}
	}
</script>

<style>
	.title {

		color: #FFFFFF;
		font-size: 3.125 rem;
	}

	.content {
		position: absolute;
		top: 5rem;
		left: 0;
		bottom: 0;
		
		
		 width:100%; background:url(../assets/img/bg.png) no-repeat; background-size:100% 100%; 

	}


	.image {
		margin-top: 13%;
	}
</style>
